package com.example.unisys.common;

import lombok.Builder;
import lombok.Data;
import lombok.ToString;

@Builder
@Data
@ToString
public class Response {

    private Integer code;
    private String message;
    private Object data;
    private Integer total;
    private String cookie;


    public static class ResponseBuilder{
        public ResponseBuilder status(STATUS status){
            this.code=status.getCode();
            this.message=status.getMessage();
            return this;
        }
    }
    public static Response getSuccessResponse(){
        return Response.builder().status(STATUS.SUCCESS).build();
    }
}
